home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 September (IDG) / Sep99.iso / Shareware World / Comms & Internet / LinkConverter 1.1.2 / Dialog Director v0.7 / Examples / FMP Browser.as < prev    next >
Encoding:
Text File  |  1998-01-12  |  1.4 KB  |  44 lines  |  [TEXT/ToyS]

  1. property fmpDialog : {bounds:[10, 40, 102, 80], contents:[¬
  2.     {class:icon push button, bounds:[2, 2, 24, 24], contents:1000, style:9}, ¬
  3.     {class:icon push button, bounds:[24, 2, 46, 24], contents:1001, style:9}, ¬
  4.     {class:icon push button, bounds:[46, 2, 68, 24], contents:1002, style:9}, ¬
  5.     {class:icon push button, bounds:[68, 2, 90, 24], contents:1003, style:9}, ¬
  6.     {class:static text, bounds:[0, 26, 92, 38], justification:center} ¬
  7.         ], name:"Browser", style:standard palette, closeable:true}
  8. dd install with fonts {name:"Geneva", size:9} float above application "FileMaker Pro" with grayscale
  9. try
  10.     local i
  11.     dd make dialog fmpDialog
  12.     try
  13.         tell application "FileMaker Pro"
  14.             activate
  15.             get (current record's cell "Index" as text) & " of " & (count records)
  16.         end tell
  17.         dd set contents of item 5 of dialog 1 to result
  18.     on error
  19.     end try
  20.     repeat
  21.         try
  22.             set i to dd interact with user for max ticks 60
  23.             tell application "FileMaker Pro"
  24.                 if i = 1 then
  25.                     go to record 1
  26.                 else if i = 2 then
  27.                     go to record before current record
  28.                 else if i = 3 then
  29.                     go to record after current record
  30.                 else if i = 4 then
  31.                     go to record -1
  32.                 else if i = -1 then
  33.                     exit repeat
  34.                 end if
  35.                 get (current record's cell "Index" as text) & " of " & (count records)
  36.             end tell
  37.             dd set contents of item 5 of dialog 1 to result
  38.         on error
  39.             dd set contents of item 5 of dialog 1 to ""
  40.         end try
  41.     end repeat
  42. on error
  43. end try
  44. dd uninstall